//
//  PushMessageViewController.m
//  work
//
//  Created by 徐宏飞 on 16/5/23.
//  Copyright © 2016年 方伟. All rights reserved.
//

#import "PushMessageViewController.h"

@interface PushMessageViewController ()
@property (weak, nonatomic) IBOutlet UILabel *lblExplain;

@end

@implementation PushMessageViewController




- (void)initNavigationBar
{
    self.enableReturnButton = YES;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.ti
    self.title = @"推送消息设置";
    self.view.backgroundColor = RGBA(239, 239, 244, 1);
    
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
    
    NSString *textStr = @"您已关闭消息提醒, 如想打开提醒, 需要在 iPhone的设置 - 通知 - 装修精灵 中手动设置";

    // 调整行间距
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:textStr];
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    [paragraphStyle setLineSpacing:8];
    [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [textStr length])];
    [attributedString addAttribute:NSForegroundColorAttributeName value:COLOR_THEHE range:NSMakeRange(22,21)];
    _lblExplain.attributedText = attributedString;
    
}



- (IBAction)btnSetting:(id)sender {
    NSLog(@"进入通知");
    NSURL*url=[NSURL URLWithString:@"prefs:root=NOTIFICATIONS_ID"];
    [[UIApplication sharedApplication] openURL:url];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
